<ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:outputStylesheet library="css" name="default.css"/>
    <f:view contentType="text/html">
                                    
            <p:growl id="growl" life="2000" />
            #{ctrMatriculas.buscar()}
            <p:outputLabel value="Filtrar por " for="C001" styleClass="optionalLbl"/>
            <p:inputText value="#{ctrMatriculas.name}" id="C001"/>
            <h:outputText value=" " />
            <p:commandButton actionListener="#{ctrMatriculas.buscar()}" value="Buscar" id="buscar"  update="tablaMat" >
               
            </p:commandButton>
            <h:outputText value=" " />
              
            <p:commandButton actionListener="#{ctrMatriculas.nuevo()}" value="Nuevo" id="nuevo" ajax="false" >
                 <p:ajax event="dialogReturn" update="tablaMat" />
               </p:commandButton>
                   
                      
            <p:dataTable var="recA" value="#{ctrMatriculas.lista}" id="tablaMat" rendered="true">
                <p:column headerText="Alumno">
                    <h:outputText value="#{recA.nalumno.nombre}" />
                </p:column>
                
                 <p:column headerText="Editar" style="width:32px;text-align: center">
                <p:commandButton  actionListener="#{ctrMatriculas.edit(recA.ncodigo)}" icon="ui-icon-search" title="Editar">
                 
                    <p:ajax event="dialogReturn" update="tablaMat" /> 
                   
                 </p:commandButton>
            </p:column>
            </p:dataTable>
       </f:view>
                    
</ui:composition>
